<form class="form-horizontal" action="{:U('Log/add')}" method="post">	
	<table class="table">
	<input type='hidden' name="r" <present name="r">value="{$r}"</present>/>
	<input type='hidden' name="module" <present name="r">value="{$module}"</present>/> 
	<input type='hidden' name="id" <present name="r">value="{$model_id}"</present>/> 
	<input type='hidden' name="role_id" value="{$Think.session.role_id}"/>
		<tr>
			<th colspan="4">{:L('BASIC_INFO')}</th>
		</tr>
		<tr>
			<td class="tdleft">{:L('SUBJECT')}</td>
			<td colspan="3"><input class="span3" type="text" name="subject" id="subject" placeholder="{:L('LESS_THAN_50_CHARACTER')}" /></td>
		</tr>
		<tr>
			<td class="tdleft">{:L('CONTENT')}</td>
			<td colspan="3"><textarea rows="6" class="span4" name="content"></textarea></td>
		</tr>
		<if condition="$module == 'leads' || $module == 'business'">
		<tr>
			<td class="tdleft">{:L('NEXTSTEP_TIME')}</td>
			<td><input type="text" value="" id="nextstep_time" class="span2" name="nextstep_time" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"></td>
			<td class="tdleft">{:L('NEXTSTEP')}</td>
			<td><input type="text" id="nextstep" class="span2" name="nextstep"></td>
		</tr>
		</if>
		<tr>
			<td>&nbsp;</td>
			<td colspan="3"><input class="btn btn-primary" type="submit" name="submit" value="{:L('ADD')}"/> &nbsp; <input class="btn" onclick="javascript:$('#dialog-log').dialog('close');" type="button" value="{:L('CANCEL')}"/></td>
		</tr>
	</table>
</form>
<script type="test/javascript">
$("input[name='submit']").click(function(){			
	if($("#subject").val() == null || $("#subject").val() == ""){
		alert('{:L('TITLE_CAN_NOT_EMPTY')}');
		return false;
	}
})
</script>